#!/usr/bin/env xonsh
from os.path import dirname,abspath,join
from os import listdir

def link(suffix=""):
  cd ~/.cache/6du/git/code.aliyun.com/6du.space@("."+suffix if suffix else "")
  for dir in listdir("."):
    print(f"\n>>> {suffix}/{dir}")
    rm -rf @(dir)
    ln -s ~/6du@("/"+suffix if suffix else "")/@(dir) .

link()
link("plugin")
# for d in 6du template sh
# do
# rm -rf $d
# ln -s ~/6du/$d .
# done
